<?php echo $this->doctype(); ?>

<html>
    <head>

        <!-- Headerinformationen aus dem Bootstraper _iniHeader und aus der Application.ini laden -->
        <?php
        $this->headLink()
                ->headLink(array('rel' => 'icon', 'href' => '/resources/images/favicon.ico', 'type' => 'image/x-icon'), 'PREPEND');
        ?>
        <?php echo $this->headTitle(); ?>

        <?php echo $this->headMeta(); ?>

        <?php echo $this->headLink(); ?>
        <?php
        $jquery = $this->jQuery();
        $jquery->enable(); // Jquery aktivieren
        $jquery->uiEnable(); // Jquery UI aktivieren kann auskommentiert werden falls nicht benötigt
        echo $jquery;
        ?>
        <script>

            $(document).ready(function() {
                $('.messages.status li').delay(1200).fadeOut(1800);
            });
        </script>

        <?php echo $this->headScript(); ?>
        <?php echo $this->headStyle(); ?>

    </head>

    <body<?php
        if ($this->documentClasses) {
            echo ' class="' . implode(' ', $this->documentClasses) . '"';
        }
        ?>>

       
        <div id="border_left"></div>
        <div id="top">
            <div id="head_left">
                <?php // echo $this->translate("Scoring your Games!"); ?>
                <?
                if (APPLICATION_ENV != "production") {
                    ?> <a class="inbeta" href="<?php
                echo $this->url(
                        array('controller' => 'static',
                    'action' => 'beta'), 'default', true)
                    ?>"><img src="/resources/images/beta.png" title="beta" /></a><?
               }
                ?>
                <div class="staticlinks">
                    <a class="index" href="<?php
                   echo $this->url(
                           array('controller' => 'index'), 'default', true)
                ?>"><?php echo $this->translate("Start"); ?></a>
                    <a class="about" href="/about"><?php echo $this->translate("About"); ?></a>
                    <a class="faq" href="/faq"><?php echo $this->translate("FAQ"); ?></a>
                    <a class="contact" href="<?php
                       echo $this->url(
                               array('controller' => 'contact',
                           'action' => 'index'), 'default', true)
                ?>"><?php echo $this->translate("Contact"); ?></a>
                </div>


            </div>   

            <div id="head_right">
                <div id="status">
                    <ul>
                        <?php
                        if (!Zend_Auth::getInstance()->hasIdentity()) {
                            ?>
                            <li><a class="login" href="/account/login"><?php echo $this->translate("Login"); ?></a></li>
                            <li><a class="login" href="/account/register"><?php echo $this->translate("Register"); ?></a></li>               
                            <?php
                        } else {
                            ?>

                            <li style="color: #<?php echo Zend_Auth::getInstance()->getIdentity()->color; ?>"><?php echo Zend_Auth::getInstance()->getIdentity()->salutation; ?></li>
                            <li><a class="prefernce" href="/account/update"> <i class="icon-cogs icon-large"></i></a></li>
                            <li><a class="prefernce" href="/account/logout"><i class="icon-off icon-large"></i></a></li>
                            <?php
                        }
                        ?>
                    </ul>
                </div>
                <?php
                if ($this->statusMessages) {
                    ?>
                    <div class="messages status">
                        <ul>
                            <?php
                            foreach ($this->statusMessages as $message) {
                                ?>
                                <li><?php echo $message; ?>
                                    <?php
                                }
                                ?>
                        </ul>
                    </div>
                    <?php
                }
                if ($this->errorMessages) {
                    ?>
                    <div class="messages error">
                        <ul>
                            <?php
                            foreach ($this->errorMessages as $message) {
                                echo '<li>' . $message . '</li>';
                            }
                            ?>
                        </ul>

                    </div>
                    <?php
                }
                ?>
            </div>

            <div id="buttommenu"></div>



        </div>
        <div id="wrapper">

            <?php if (Zend_Auth::getInstance()->hasIdentity()) { ?>
                <div id="navigation">

                    <a class="event" href="<?php
            echo $this->url(
                    array('controller' => 'event',
                'action' => 'index'), 'default', true)
                ?>"><?php echo $this->translate("Events"); ?></a>

                    <a class="analytical"  href="<?php
                   echo $this->url(
                           array('controller' => 'analytical',
                       'action' => 'index'), 'default', true)
                ?>"><?php echo $this->translate("Analyticals"); ?></a>
                </div>
            <?php } ?>
            <?php echo $this->layout()->content ?>


        </div>
  
     <div id="logo"></div>
    </body>